/* 重构培训日程样式 - 基于现代设计原则 */

/* 基础重置 */
* {
  box-sizing: border-box;
}

.training-schedule-v2 {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  color: #1e293b;
}

/* 页面标题 */
.page-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* 主容器布局 */
.schedule-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* 侧边栏 */
.schedule-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

/* 按钮样式 */
.action-btn, .filter-btn, .view-btn, .nav-btn {
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.action-btn {
  background: #3b82f6;
  color: white;
  width: 100%;
  justify-content: center;
}

.action-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.filter-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  margin: 0.25rem;
  flex: 1;
  justify-content: center;
}

.filter-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.filter-btn:hover:not(.active) {
  background: #e2e8f0;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.category-filters .filter-btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

/* 搜索框 */
.search-box {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 统计网格 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3b82f6;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* 图例 */
.legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-icon {
  font-size: 1rem;
}

/* 主内容区 */
.schedule-main {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  background: white;
  color: #475569;
  border: 1px solid #d1d5db;
  padding: 0.5rem 1rem;
}

.view-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.navigation-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  background: white;
  color: #475569;
  border: 1px solid #d1d5db;
  padding: 0.5rem 1rem;
}

.nav-btn:hover {
  background: #f1f5f9;
}

.current-period {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
}

/* 周视图 */
.week-view {
  padding: 1rem;
}

.week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.day-header {
  background: #f8fafc;
  padding: 1rem;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
}

.day-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.day-date {
  color: #64748b;
  font-size: 0.9rem;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.day-column {
  background: white;
  min-height: 400px;
  padding: 0.5rem;
}

/* 事件卡片 */
.event-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-left: 4px solid;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-time {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.event-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-icon {
  font-size: 1rem;
}

.event-location,
.event-trainer {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.125rem;
}

/* 月视图 */
.month-view {
  padding: 1rem;
}

.month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e2e8f0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.weekday-header {
  background: #f8fafc;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
}

.month-grid {
  background: #e2e8f0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.day-cell {
  background: white;
  min-height: 100px;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
}

.day-cell.other-month {
  background: #f8fafc;
  color: #94a3b8;
}

.day-number {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mini-event {
  font-size: 0.7rem;
  color: white;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.more-events {
  font-size: 0.7rem;
  color: #64748b;
  cursor: pointer;
}

/* 列表视图 */
.list-view {
  padding: 1.5rem;
}

.list-header {
  margin-bottom: 1.5rem;
}

.list-header h3 {
  margin: 0;
  color: #1e293b;
}

.list-events {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-event-card {
  display: flex;
  background: white;
  border: 1px solid #e2e8f0;
  border-left: 4px solid;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-date {
  background: #f8fafc;
  padding: 1.5rem;
  text-align: center;
  min-width: 100px;
  border-right: 1px solid #e2e8f0;
}

.event-month {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 600;
}

.event-day {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.event-weekday {
  font-size: 0.8rem;
  color: #64748b;
}

.event-content {
  padding: 1.5rem;
  flex: 1;
}

.event-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.event-title-row h4 {
  margin: 0;
  font-size: 1.2rem;
  color: #1e293b;
}

.event-category {
  font-size: 0.75rem;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.event-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: #64748b;
}

/* 模态框 */
.event-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.event-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}

.modal-icon {
  font-size: 2rem;
}

.modal-title {
  flex: 1;
}

.modal-title h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.modal-category {
  font-size: 0.9rem;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #e2e8f0;
}

.modal-content {
  padding: 1.5rem;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.info-label {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1rem;
  color: #1e293b;
  font-weight: 500;
}

.modal-description {
  margin-bottom: 1.5rem;
}

.modal-description h3 {
  margin: 0 0 0.5rem 0;
  color: #1e293b;
}

.modal-description p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.modal-materials h3 {
  margin: 0 0 0.5rem 0;
  color: #1e293b;
}

.material-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.material-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.9rem;
}

.material-icon {
  font-size: 1rem;
}

.material-name {
  color: #475569;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .schedule-container {
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .schedule-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .schedule-sidebar {
    position: static;
    order: 2;
  }
  
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .navigation-controls {
    justify-content: center;
  }
  
  .week-grid,
  .month-grid {
    overflow-x: auto;
  }
  
  .week-header,
  .month-header {
    min-width: 700px;
  }
  
  .week-grid,
  .month-grid {
    min-width: 700px;
  }
  
  .page-header {
    padding: 2rem 1rem;
  }
  
  .header-content h1 {
    font-size: 2rem;
  }
  
  .header-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .schedule-container {
    padding: 0.5rem;
  }
  
  .controls-bar {
    padding: 1rem;
  }
  
  .view-controls,
  .navigation-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .list-event-card {
    flex-direction: column;
  }
  
  .event-date {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: auto;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  
  .modal-header {
    flex-direction: column;
    text-align: center;
  }
  
  .modal-info-grid {
    grid-template-columns: 1fr;
  }
}